package com.lagou.handler;

import lombok.Data;

import java.lang.reflect.Method;
import java.util.HashMap;
import java.util.Map;
import java.util.regex.Pattern;


/**
 * 封装handler方法相关的信息
 */
@Data
public class Handler {


    private Object service; // method.invoke(obj,)

    private Method method;

    private Map<String,Integer> paramIndexMapping; // 参数顺序,是为了进行参数绑定，key是参数名，value代表是第几个参数 <name,2>


    public Handler(Object service, Method method) {
        this.service = service;
        this.method = method;
        this.paramIndexMapping = new HashMap<>();
    }

}
